﻿using System.Windows.Forms;
using BlueDot.Mobile.Core;

namespace KeyboardInput.Views
{
    public partial class View1 : ViewBase
    {
        #region Constructors

        public View1()
        {
            InitializeComponent();
        }

        [DependencyConstructor]
        public View1(IMobileApplication application)
            : base(application)
        {
            InitializeComponent();
        }

        #endregion

        #region public

        [Receiver(ApplicationActions.KeyboardInput, UpdateMode = UpdateMode.WhenActive)]
        public void OnKeyboardInput(object sender, KeyEventArgs e)
        {
            txtInputLabel.Text = e.KeyData.ToString();
        }

        #endregion
    }
}